package com.cci.kangdao.service;

import com.cci.kangdao.dto.BaseResponse;
import com.cci.kangdao.entity.WorkOrderCloseEntity;
import com.cci.kangdao.model.DiagnoseConclusionInfo;
import com.cci.kangdao.model.condition.CloseWorkOrderCondition;
import com.cci.kangdao.model.condition.RefuseCloseWorkOrderCondition;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

//工单类接口
public interface WorkOrderTService {

	// 服务站站长和服务站信息员和服务技师关闭工单(根据工单主键id修改工单表中工单状态，关闭时间，关闭原因，修改人，修改时间)
	public BaseResponse updateCloseWorkOrderById(Map<String, Object> map);

	// 区域工程师关闭工单(根据工单主键id修改工单表中工单状态，关闭时间，关闭原因，修改人，修改时间)
	public ModelAndView areaEngineerCloseWorkOrder(Map<String, Object> map);

	// 接受工单
	public ModelAndView receiveWorkOrder(Map<String, Object> map);

	// 服务站拒绝工单
	public ModelAndView serviceStationRefuseWorkOrder(Map<String, Object> map);

	// 开始维修和维修完成接口(两个合为一个)
	public ModelAndView startRepairToEndWorkOrder(Map<String, Object> map);

	// 当服务技师点击开始维修按钮时调用这个接口
	public ModelAndView checkServiceStationPower(Map<String, Object> map);

	// 区域工程师远程解决服务工单功能
	public ModelAndView areaEngineerLongResolve(Map<String, Object> map);

	// 诊断结论详情
	public DiagnoseConclusionInfo getDiagnoseByOrderId(Long orderId);

	// 区域工程师指派服务工单给服务站
	public ModelAndView areaEngineerAssignServerStation(Map<String, Object> map);

	// 服务站拒绝工单(区域工程师指派服务站，服务站拒单调用这个方法)
	public ModelAndView serviceStationRefuseWorkOrderForDBU(Map<String, Object> map);

	// 服务技师自行诊断服务工单(DBU)
	ModelAndView selfDiagnosticWorkOrder(Map<String, Object> map);

	// 获取自行诊断详情(DBU)
	ModelAndView getSelfDiagnosticDetail(Map<String, Object> map);

	// CCEC400审核不通过驳回时 根据工单来源让对应用户更新工单信息 (用户报单让用户更新 服务站报单让服务站站长信息员更新)
	ModelAndView updateWorkOrderMsg(Map<String, Object> map);

	// 保存负责人信息
	void savePrincipal(Long workOrderId, int OrderStatus, int IsPrincipal, long PrincipalId, long ProcessorId,
			String CreateTime);

	// DBU技师点击开始诊断维修按钮
	ModelAndView clickRepairForDBU(Map<String, Object> map);

	// 通过esn获取smn
	ModelAndView getSMNByESN(Map<String, Object> map);

	void updateWorkOrderStatus(Map<String, Object> map);

	/**
	 * 移动技师项目获取服务工单
	 * 
	 * @param map
	 */
	void getWorkOrderForMT(Map<String, Object> map);

	ModelAndView getWaitAssignTechnicianOrderList(Map<String, Object> map);

	ModelAndView getWorkOrderMsg(Map<String, Object> map);

	ModelAndView getMTMsgByWorkOrder(Map<String, Object> map);

	void closeWorkOrderById(CloseWorkOrderCondition condition);

	void refuseCloseWorkOrderById(RefuseCloseWorkOrderCondition condition);

	ModelAndView workOrderClosedAbnormally(WorkOrderCloseEntity workOrderCloseEntity);

    ModelAndView updateWorkOrder(Map<String, Object> workOrderTMap, HttpServletResponse response);

	ModelAndView isMeetStrongRelationCDS(Map<String, Object> map);

	ModelAndView srtSyncRepairAckToCRM(Map<String, Object> map);

    ModelAndView updateWorkOrderByOcr(Map<String, Object> map, HttpServletResponse response);

    BaseResponse getWorkOrderByStationAndEsn(Long stationId, List<String> esnList);
}
